import React, { Component } from 'react'
import { Result } from 'antd-mobile';
import { getSearchParams } from '../../utils/param'
import './index.css'
const myImg = src => <img src={src} className="am-icon am-icon-lg success-icon" alt="" />;
export default class index extends Component {
    constructor(props){
        super(props)
        this.state = {
            resultMsg: '操作成功'
        }
    }
    componentDidMount(){
        let searchParams = getSearchParams(this.props.location.search)
        this.setState({
            resultMsg: decodeURIComponent(searchParams.resultMsg)
        })
    }
    render() {
        return (
            <div className="result-class">
                 <Result
                    img={myImg(require('../../assets/imgs/icon-success.png'))}
                    title={this.state.resultMsg}
                />
            </div>
        )
    }
}
